<template>
    <div>
        <navtitle title="商品详情" />
        <swiper imgwidth="100%" imgheight="150px" :images="imagesList" />
        <div v-html="detailApiData.goods_introduce"></div>
        <van-action-bar>
            <van-action-bar-icon icon="chat-o" text="客服" dot />
            <van-action-bar-icon icon="cart-o" text="购物车" badge="5" />
            <van-action-bar-icon icon="shop-o" text="店铺" badge="12" />
            <van-action-bar-button type="warning" text="加入购物车" />
            <van-action-bar-button type="danger" text="立即购买" />
        </van-action-bar>
    </div>
</template>

<script setup>
import navtitle from '@/components/navtitle.vue';
import { detailApi } from '@/api/api';
import swiper from '@/components/swiper.vue';
const imagesList = [
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-5.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-8.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg',
];
import { useRoute, useRouter } from 'vue-router'

const route = useRoute()
import { ref } from 'vue'
const detailApiData = ref([])
detailApi(route.params.goods_id).then((res) => {
    console.log('详情', res);
    detailApiData.value = res.data.message
})
</script>

<style lang="scss" scoped></style>